//
//  MapView.m
//  InnoBeacon
//
//  Created by INNO on 14-1-16.
//  Copyright (c) 2014年 com.inno-vision. All rights reserved.
//

#import "MapView.h"

@interface MapView()
{
}

@property UIColor *backgroundColor;

@end

@implementation MapView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"导航图.png"]];
        imgView.frame = self.bounds;
        imgView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
        [self addSubview:imgView];
        
    }
    
    
    
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/


-(void)drawRect:(CGRect)rect
{
    //An opaque type that represents a Quartz 2D drawing environment.
    //一个不透明类型的Quartz 2D绘画环境,相当于一个画布,你可以在上面任意绘画
    CGContextRef context = UIGraphicsGetCurrentContext();

    UIColor*aColor = [UIColor colorWithRed:1 green:0.0 blue:0 alpha:1];
    CGContextSetFillColorWithColor(context, aColor.CGColor);//填充颜色
    CGContextSetLineWidth(context, 3.0);//线的宽度
    
    //填充圆，无边框
    CGContextAddArc(context, 100, 30, 100, 0, 2*M_1_PI, 0); //添加一个圆
    CGContextDrawPath(context, kCGPathFill);//绘制填充
    
    
}

@end
